package com.gaojiabao.panghu.controller;

import com.gaojiabao.panghu.data.pojo.Admin;
import com.gaojiabao.panghu.service.LoginService;
import com.gaojiabao.panghu.utils.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: gaojiabao
 * @Date: 2024/11/3 13:41
 */
@RestController
public class LoginController {
    @Resource
    private LoginService loginService;

    /**
     * 后台登录
     * /login
     * @return 数据返回状态
     */
    @PostMapping("login")
    public Result<?> login(@RequestBody Admin admin) {
        return loginService.login(admin);
    }
}
